#!/usr/bin/perl -ws
while (defined ($line = <>)) {
  $orig_line = $line;
  $line =~ s/^[\t ]*//g;
  $line =~ s/[\t ]*[\r\n]*$//g;
  $line =~ s/[\t ][\t ]*/ /g;
  $new_line = $line;
  $new_line =~ s/[();]/ /g;
  $new_line =~ s/  */ /;
  #print "new_line=$new_line\n";
  ($obj_method_setter, $task_method_getter) = split(" ", $new_line);
  $obj_method_setter =~ s/\./ /g;
  ($obj, $obj_setter) = split(" ", $obj_method_setter);
	$pos = index($orig_line, $obj);
	$indent = substr($orig_line, 0, $pos);
  print "${indent}if ($task_method_getter() != null) {\n";
	$orig_line =~ s/$obj/  $obj/;
  print "$orig_line";
  print "$indent} else if (rcCmdReq.isTrace()) {\n";
	$just_getter = $obj_setter;
	$just_getter =~ s/^.*\.//;
	if ($just_getter =~ /^is/) {
		$just_getter =~ s/^set/is/;
		$just_getter =~ s/\.set/is/;
	} else {
		$just_getter =~ s/^set/get/;
		$just_getter =~ s/\.set/get/;
	};
	$nobj_getter = "$obj.$just_getter";
  print "$indent  System.out.println(\"$nobj_getter()=\" + $nobj_getter());\n";
  print "$indent};\n";

};
exit 0;
{
$bogus = <<QUIT
    coll.setStyleAlias(getStyleAlias());
		entity.setDescription(rcCmdDef.getDescription());
		entity.setDescription(rcCmdDef.getDescription());
};
QUIT
};
print "$bogus $obj\n";
